package com.fenyin.samples.study.parttern.struct.flyweight.example1;  

import java.util.ArrayList;
import java.util.List;

/**
 *@Title:  复合享元模式
 *<p>PhoneMessage：复合具体享元角色</p>
 *@Author:fengzhichao  
 *@Since:2012-9-29  
 *@Version:1.1.0
 */
public class PhoneBatchMessage implements Message{
	private List<Message> messageList = new ArrayList<Message>();;
	
	public void addMessage(Message message){
		messageList.add(message);
	}
	
	public void display(String recvPerson) {
		for(Message message : messageList){
			message.display(recvPerson);
		}
	}
	
}
